riscv: add Kconfig entries for the code model
authorLukas Auer <[email protected]>
Wed, 12 Dec 2018 14:12:23 +0000 (06:12 -0800)
committerAndes <[email protected]>
Tue, 18 Dec 2018 01:56:26 +0000 (09:56 +0800)
commit8176ea4d58d18740e344dd4b587433c9f7772ac1
tree0ac0385063b900f9b98c484266df33c164894685
parent1f2e948d6d53f77a2ddb2dde3531b0d5bc2815ad
riscv: add Kconfig entries for the code model

RISC-V has two code models, medium low (medlow) and medium any (medany).
Medlow limits addressable memory to a single 2 GiB range between the
absolute addresses -2 GiB and +2 GiB. Medany limits addressable memory
to any single 2 GiB address range.

By default, medlow is selected for U-Boot on both 32-bit and 64-bit
systems.

The -mcmodel compiler flag is selected according to the Kconfig
configuration.

Signed-off-by: Lukas Auer <[email protected]>
[bmeng: adjust to make medlow the default code model for U-Boot]
Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
arch/riscv/Kconfig
arch/riscv/Makefile